<div ng-init="init();" class="kmi-layout-content home-content">
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="brand-title">
            <div class="custom" ng-if="companyName">
                <div class="title" ng-bind="companyName"></div>
                <img src="" alt="" class="brand">
                <div class="gap"></div>
            </div>
            <div class="digiwin">
                <img src="image/smes_v340/logo_ch.png" alt="">
                <img src="image/smes_v340/logo_en.png" alt="">
            </div>
        </div>
        <div class="header-title" ng-bind="'home.title' | translate"></div>
    </div>
    <div class="kmi-layout-main-content system-info">
        <div class="kmi-row-fields" style="border-bottom:1px #cecece solid;padding-bottom: 8px;">
            <div class="column-item left">
                <label class="label" ng-bind="'home.onwork_time' | translate"></label>
                <label class="value" ng-bind="onwork_time"></label>
            </div>
            <div class="column-item right">
                <button class="kmi-button__mobile" ng-click="changeMachine();" style="flex:0 0 160px;">
                    <label ng-bind="('home.machine_count' | translate)+machines.length"></label>
                    <div class="kmi-can-click"></div>
                </button>
            </div>
        </div>
        <div class="kmi-row-fields">
            <div class="dashboard-item">
                <div class="item-title" ng-bind="'home.work_time' | translate"></div>
                <div mdl-piechart datas="pie_data_work_time" config="pieChart_config"></div>
                <div class="item-value">
                    <label class="value" ng-bind="pie_data_work_time[0].value+'%'"></label>
                </div>
            </div>
            <div class="dashboard-item">
                <div class="item-title" ng-bind="'home.qty' | translate"></div>
                <div mdl-piechart datas="pie_data_qty" config="pieChart_config"></div>
                <div class="item-value">
                    <label class="value" ng-bind="pie_data_qty[0].value+'%'"></label>
                </div>
            </div>
        </div>
        <div class="kmi-row-fields qr-code" style="border-bottom:1px #cecece solid;padding-bottom: 8px;">
            <div class="column-item">
                <img src="image/icons/search.png" height="24" width="24"></img> 
                <input ng-keypress="input_plot_no($event);" id="input_plot" ng-model="barcode_plot_no" style="margin-left: 8px;" ng-blur="input_plot_blur();"/>
                <div class="tip qrcode" ng-click="QRCodeScanner();">
                    <img src="image/icons/QRCode.png">
                </div>
            </div>
        </div>
        <div class="kmi-list">
            <div class="kmi-list__row-content">
                <div class="row-content" ng-repeat="machine in machines | filter:{'machine_name': barcode_plot_no} track by $index">
                    <div class="kmi-row-fields" style="margin-bottom: 12px;">
                        <div class="column-item left row-title" ng-bind="machine.machine_name"></div>
                        <div class="column-item right" style="align-items: center;">
                            <div class="task-load-tag" ng-bind="machine.run_plot_number + '/'+machine.dispatch_number"></div>
                        </div>
                    </div>
                    <div class="kmi-row-fields">
                        <div class="column-item left" style="align-items: center;" ng-show="permission.B0202 && permission.B0203">
                            <div class="status-tag" style="z-index:1;" ng-click="workSet($event,machine);" ng-class="{'is-work-on':onMachineUser(machine)}">
                                <label ng-bind="'home.employee_status_'+machine.employee_status | translate"></label>
                                <div class="kmi-can-click"></div>
                            </div>
                        </div>
                        <div class="column-item right" style="width: 85%;flex-wrap: wrap;">
                            <button class="kmi-button__mobile" style="z-index:1;padding:0px;flex: 1; margin: 5px 1%;" ng-click="load_mobile10($event, machine);" style="margin-right:12px;" ng-show="permission.B0221">
                                <label ng-bind="'home.mold_setup' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </button>
                            <!-- 20230303 modify by Alan for#0128964: -->
                            <button class="kmi-button__mobile" style="z-index:1;padding:0px;flex: 1; margin: 5px 1%;" ng-click="load_mobile02($event, machine, 'S');" style="margin-right:12px;" ng-show="permission.B0211 && EQP_MNG">
                                <label ng-bind="'home.change_status' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </button>
                            <!-- 20230303 modify by Alan for#0128964: -->
                            <button class="kmi-button__mobile" style="z-index:1;padding:0px;flex: 1; margin: 5px 1%;" ng-click="load_mobile02($event, machine, 'C');" ng-show="permission.B0210 && EQP_CHK">
                                <label ng-bind="'home.check_status' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </button>
                            <button class="kmi-button__mobile" style="z-index:1;padding:0px;flex: 1; margin: 5px 1%;" ng-click="load_mobile13($event, machine,machines);" ng_show="GroupreportworkOption" style="margin-right:12px;">
                                <label ng-bind="'home.category' | translate"></label>
                                <div class="kmi-can-click"></div>
                            </button>
                        </div>
                    </div>
                    <div class="kmi-can-click" ng-click="load_mobile01(machine);"></div>
                </div>
            </div>
        </div>
    </div>
</div>
